/**
 * 应用中心-镜像管理mock拦截配置
 * create by xyr on 2017-09-26
 */

import Mock from 'mockjs';


const privatedataList = [];
const count = 5;

for (let i = 0; i < count; i++) {
    privatedataList.push(Mock.mock({
        repoName: '@cname',
        repoType: '私有',
        // version: 'v1.0',
        pullCount: '@increment'
    }));
}





 export default {
    queryPrivateRepository: () => {
        // console.log('queryPrivateRepository=' + JSON.stringify(privatedataList));
        return {
            meta: {
                code: 200,
                message: 'success'
            },
            /* data: {
                total: privatedataList.length,
                images: privatedataList 
            } */
            data: privatedataList
        }
    },
    getImage: () => {
        return {
            meta: {
                code: 200,
                message: 'success'
            },
            data: [
                Mock.mock(
                    {
                        imageLabel: 'V2.',
                        command: '@increment',
                        editor: '@cname',
                        createTime: '2017-09/25'
                    }
                )
            ]
        }
    }
 }